package com.shemy.sshiro.service.impl;

import com.shemy.sshiro.domain.SysUser;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

import com.shemy.sshiro.dao.SysUserMapper;
import com.shemy.sshiro.service.SysUserService;

/**
 *  用户ServiceImpl
 * @author Dzsom
 * @date 2019-05-09 10:56
 */
@Service
public class SysUserServiceImpl implements SysUserService{

    @Resource
    private SysUserMapper sysUserMapper;

    @Override
    public int deleteByPrimaryKey(Integer userId) {
        return sysUserMapper.deleteByPrimaryKey(userId);
    }

    @Override
    public int insert(SysUser record) {
        return sysUserMapper.insert(record);
    }

    @Override
    public int insertSelective(SysUser record) {
        return sysUserMapper.insertSelective(record);
    }

    @Override
    public SysUser selectByPrimaryKey(Integer userId) {
        return sysUserMapper.selectByPrimaryKey(userId);
    }

    @Override
    public int updateByPrimaryKeySelective(SysUser record) {
        return sysUserMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return sysUserMapper.updateByPrimaryKey(record);
    }

    @Override
    public SysUser findByName(String name) {
        return sysUserMapper.findByAccount(name);
    }

}
